#!/bin/sh

VERSION="$1"
mvn versions:set -DgroupId=org.eclipse.sirius -DartifactId="*" -DoldVersion="*" -DnewVersion="$VERSION" -f packages/pom.xml

npm version "$VERSION"  --commit-hooks=false --git-tag-version=false --workspaces=true --include-workspace-root=true --workspaces-update=false
npm i

cd vscode-extension
npm version "$VERSION"  --commit-hooks=false --git-tag-version=false --workspaces=false --include-workspace-root=false --workspaces-update=false
npm i
cd ..

cd integration-tests
npm version "$VERSION"  --commit-hooks=false --git-tag-version=false --workspaces=false --include-workspace-root=false --workspaces-update=false
npm i
cd ..